<div class="post">
	<div class="title">
		<h2><?php echo CHtml::link($data->title, $data->url); ?></h2>
	</div>
	<div class="author">
		<?php echo Yii::t('site', 'posted by').' <b>'.$data->author->username . '</b> on ' . date('F j, Y',$data->create_time); ?> 
		<?php echo Yii::t('site', 'Category');?>: <?php echo ($data->category_id > 0) ? CHtml::link($data->category->name, Yii::app()->createUrl("post/index", array("category" => $data->category_id))) : Yii::t('site', 'No Category');?>
	</div>
	<div class="content" style="padding-top:15px;">
		<?php if (isset($data->imageId)) 
                    {
                    $filename = Yii::app()->image->getUrl($data->imageId, 'medium');
                    echo CHtml::image($filename, 'image', array('class'=>'postimage'));
                    }?>
		<?php
			$this->beginWidget('CMarkdown', array('purifyOutput'=>true));
			echo $data->content;
			$this->endWidget();
		?>
	</div>
	<div class="nav" style="padding-bottom:30px;clear:both">
		<!--<b>Tags:</b>
		<?php echo implode(', ', $data->tagLinks); ?>-->
		<br/>
		<!--<?php echo CHtml::link('Permalink', $data->url); ?> |-->
		<?php echo CHtml::link(Yii::t('site', 'Comments')." ({$data->commentCount})",$data->url.'#comments'); ?> |
		<?php echo Yii::t('site', 'Last updated on').' '.date('F j, Y',$data->update_time); ?>
	</div>
</div>
